package com.aabte.weather.city;

import com.aabte.weather.city.api.City;
import com.aabte.weather.city.api.CityApi;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Validated
@RestController
public class CityController implements CityApi {

    @Resource
    private CityDataService cityDataService;

    @Override
    public List<City> listCity() {
        return cityDataService.listCity();
    }

}
